<!DOCTYPE html>
<html>
<head>
	<title>Test NewsAreRelated Function</title>
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body>
<?php
include_once('classes/News.php');
include_once('functions/newsAreRelated.php');
$titleNonRelated = 'Presentaron un proyecto para declarar la nulidad de la ley de cautelares';
echo "Noticia 1: $titleNonRelated";
echo "</br>";
$newsNonRelated = new News();
$newsNonRelated->setTitle($titleNonRelated);
$otherTitleNonRelated = 'Si no garantizan el pago de salarios vamos a seguir con el paro de micros';
$otherNewsNonRelated = new News();
$otherNewsNonRelated->setTitle($otherTitleNonRelated);
echo "Noticia 2: $otherTitleNonRelated";
echo "</br>";
$areRelated = newsAreRelated($newsNonRelated,$otherNewsNonRelated);

if($areRelated){
	echo "Las noticias estan relacionadas </br>";
}
else{
	echo "Las noticias no estan relacionadas </br>";
}

echo "</br>";

$relatedTitle = 'En Avellaneda, Racing no puede ante la resistencia de Velez';
$otherRelatedTitle = 'racing no puede ante la resistencia de vélez En avellaneda';
echo "Noticia 1: $relatedTitle";
echo "</br>";
echo "Noticia 2: $otherRelatedTitle";
echo "</br>";
$newsRelated = new News();
$newsRelated->setTitle($relatedTitle);
$othernewsRelated = new News();
$othernewsRelated->setTitle($otherRelatedTitle);

$areRelated = newsAreRelated($newsRelated,$othernewsRelated);

if($areRelated){
	echo "Las noticias estan relacionadas";
}
else{
	echo "Las noticias no estan relacionadas";
}

echo "</br>";
?>
</body>
</html> 